function sitebutton_onmouseevent(buttonInstance, isOver)
{
	var activatorStyle = buttonInstance._divTarget.style;
	var sourceImage = isOver ? buttonInstance._imgOver : buttonInstance._imgIdle;
	
	activatorStyle.backgroundImage = "url(" + sourceImage.src + ")";
}

function sitebutton(divTarget, imgURL_idle, imgURL_over, func_click)
{
	this._divTarget = document.getElementById(divTarget);
	this._divTarget.onmouseover = ( function(n){ return function(){sitebutton_onmouseevent(n, true);} } )( this );
	this._divTarget.onmouseout = ( function(n){ return function(){sitebutton_onmouseevent(n, false);} } )( this );
	this._divTarget.onclick = func_click;
	
	this._imgIdle = new Image();
	this._imgOver = new Image();	
	
	this._imgIdle.src = imgURL_idle;
	this._imgOver.src = imgURL_over;

	var activatorStyle = this._divTarget.style;
	activatorStyle.backgroundImage = "url(" + this._imgIdle.src + ")";
}